#pragma once
#include "../DirectX/stdafx.h"

class Blind_PathFinding_Plane
{
private:
	vector<D3DXVECTOR2>			Lines;
	vector<D3DXVECTOR4>			buf;

	vector<float>				lengths;

	D3DXVECTOR2					Direction,
								PastDirection;

public:
	Blind_PathFinding_Plane()
	{
		Lines.	resize(9);
		buf.	resize(9);

		D3DXMATRIX						Rotate;
		D3DXMatrixIdentity				(&Rotate);
		
		for(float q=0; q<9; q++)
		{
			D3DXMatrixRotationZ(&Rotate, q * 0.69813170079f );
 
			D3DXVec2Transform(&buf[q], &D3DXVECTOR2(1, 0), &Rotate); 
			Lines[q].x = buf[q].x;
			Lines[q].y = buf[q].y;
		}
	}
	Blind_PathFinding_Plane(int size)
	{
		Lines.	resize(size);
		buf.	resize(size);

		D3DXMATRIX						Rotate;
		D3DXMatrixIdentity				(&Rotate);
		
		for(float q=0; q<size; q++)
		{
			D3DXMatrixRotationZ(&Rotate, q * 0.69813170079f );
 
			D3DXVec2Transform(&buf[q], &D3DXVECTOR2(1, 0), &Rotate); 
			Lines[q].x = buf[q].x;
			Lines[q].y = buf[q].y;
		}
	}


	void Update(vector<float> lengths_)
	{
		lengths = lengths_;
	}

	D3DXVECTOR2 getOptimalPath()
	{
		D3DXVECTOR2			result;

		for(int q=0; q<Lines.size(); q++)
		{

		}

		return result;
	}
};

